cmake_minimum_required(VERSION 3.4.1)
ENABLE_LANGUAGE(ASM)

set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s -O3  -ffunction-sections -fdata-sections -fno-gnu-unique -fpic -fvisibility=hidden")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -O3 -ffunction-sections -fdata-sections -fno-gnu-unique -fpic -fvisibility=hidden")


set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

set(CXX_INC_PATH  ${CMAKE_SOURCE_DIR}/mnn_test)
include_directories(${CXX_INC_PATH})

SET(CMAKE_CXX_FLAGS "-static -fopenmp ${CMAKE_CXX_FLAGS}")
#SET (	CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}"	)

SET(EXECUTABLE_OUTPUT_PATH	${CMAKE_SOURCE_DIR}/libs/)

add_executable (mnn_test ${CMAKE_SOURCE_DIR}/mnn_test/segment.cpp)
target_link_libraries(
		mnn_test

    -Wl,--whole-archive
    ${MNN_LIB_PATH}
    -Wl,--no-whole-archive

)
